<template>
	<!--发现-->
	<div class="findOut">
		<!--导航-->
		<FindtheNavigation></FindtheNavigation>
		<!--内容-->
		<transition name="fade">
			<router-view></router-view>
		</transition>
	</div>
</template>

<script>
	import FindtheNavigation from "./FindtheNavigation";
	import foundContents from "./FoundContent";
	import selects from "./select";
	import jsonp from "jsonp";
	export default {
		name: "findOut",
		data() {
			return {

			}
		},
		components: {
			FindtheNavigation,
			foundContents,
			selects,
		},
		created() {
			jsonp("http://tingapi.ting.baidu.com/v1/restserver/ting?from=qianqian&version=2.1.0&method=baidu.ting.billboard.billList&format=json&type=6&offset=0&size=50", null, (err, res) => {
				if(err) {
					console.log(err);
				} else {
					console.log(res);
					jsonp("http://tingapi.ting.baidu.com/v1/restserver/ting/?method=baidu.ting.song.play&songid=223432", null, (err, res) => {
						if(err) {
							console.log(err)
						} else {
							console.log(res)
							this.$store.commit("changSong", res.bitrate.file_link)
							this.$store.commit("changeid",res.songinfo.pic_big)
						}
					})
				}
			})
		}
	}
</script>

<style scoped lang="scss">
	.fade-enter-active,
	.fade-leave-active {
		transition: all .4s;
		transform: translateX(0%);
	}
	
	.fade-enter {
		transition: all .4s;
		transform: translateX(100%);
	}
	
	.fade-leave-to {
		transition: all .4s;
		transform: translateX(-100%);
	}
</style>